<!DOCTYPE html>
<body>
<script src="../resources/runner.js"></script>
<script src="resources/paint.js"></script>
<div id="block">
  <span id="container" style="-webkit-mask-box-image: url(resources/mask.png) 50 50 50 50"></span>
</div>
<script>
// This test measures the lifecycle update performance when move text
// with mask in a large page.

var initialTextCount = 10000;
var initialText = "";
for (var i = 0; i < initialTextCount; i++) {
  if (i % 10 == 0)
    initialText += '<br>';
  initialText += '<span>abc</span> ';
}

var margin = 10;

measurePaint({
  run: function() {
    margin += 5;
    block.style.marginTop = margin + 'px';
  },
  setup: function() {
    container.innerHTML = initialText;
  },
  done: function() {
    container.innerHTML = '';
  },
});
</script>
</body>
